package cn.cleanarch.infra.idp.pms.dao.repository;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import cn.cleanarch.infra.idp.pms.dao.mapper.ProjectCategoryMapper;
import cn.cleanarch.infra.idp.pms.domain.entity.ProjectCategory;
import cn.cleanarch.infra.idp.pms.domain.query.ProjectCategoryQuery;
import cn.cleanarch.infra.idp.commons.domain.dto.PageResult;
import org.springframework.stereotype.Component;
import org.apache.ibatis.annotations.Param;

/**
 * 项目分类Repository类
 */
@Component
public class ProjectCategoryRepository extends ServiceImpl<ProjectCategoryMapper, ProjectCategory> implements IService<ProjectCategory> {
    
    /**
     * 分页查询项目分类
     * @param query 查询参数
     * @return 分页结果
     */
    public Page<ProjectCategory> pageQuery(ProjectCategoryQuery query) {
        return this.baseMapper.pageQuery(new Page<>(query.getPageNo(), query.getPageSize()), query);
    }
}